from matplotlib import pyplot as plt

x = range(1,31)
y = [0.578,0.558,0.643,0.627,0.668,0.643,0.649,0.643,0.664,0.659,0.671,0.647,0.665,0.654,0.664,0.658,0.661,
     0.670,0.657,0.661,0.687,0.680,0.684,0.681,0.672,0.675,0.685,0.681,0.674,0.676]

# y.sort()
# print(y)
# x_label = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,28,29,31,
#      33,35,37,38,39,41,43,44,45,47,48,49,50]
#设置图形大小和像素
plt.figure(figsize=(20,8),dpi=80)

#设置x轴的刻度
plt.xticks(x)

#绘图
plt.plot(x,y)

# #保存
# # plt.savefig("./test_dir.jpg")
#
#展示图形
plt.show()
